﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="OF.Web.admin.index" %>

<%@ Register Src="~/admin/controls/head.ascx" TagPrefix="uc1" TagName="head" %>
<%@ Register Src="~/admin/controls/footer.ascx" TagPrefix="uc1" TagName="footer" %>
<%@ Register Src="~/admin/controls/menu.ascx" TagPrefix="uc1" TagName="menu" %>
<!DOCTYPE HTML>
<html>
<head>
    <title>首页</title>
    <meta charset="gbk">
    <link href="res/css/main.css" rel="stylesheet">
    <link href="res/css/public.css" rel="stylesheet">
    <script type="text/javascript" src="res/js/jquery-1.8.0.min.js"></script>
</head>
<body>
    <form id="Form1" runat="server">
        <uc1:head runat="server" ID="head" />

        <div id="page">
            <div class="clearfix" id="content">
                <div class="col-main">
                    <div class="main-wrap">
                        <input name="_tb_token_" type="hidden" value="6xra3Klm">
                        <div class="agent-panel">
                            <div class="agent-item">
                                <h2>提醒</h2>
                                <div class="agent-item-wrap account-tips">
                                    <p class="account">
                                        亲爱的<asp:Literal ID="lbName" runat="server"></asp:Literal>,
                                        <span id="tip">您有0笔订单需要处理</span>															
                                    </p>
                                </div>
                            </div>

                            <div class="agent-item">
                                <h2>快捷操作</h2>
                                <div class="agent-item-wrap buz-help">
                                    <p>
                                        1.处理订单<a href="orderlist.aspx?state=0">进入&gt;&gt;</a>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <uc1:menu runat="server" ID="menu" />
            </div>
        </div>

        <uc1:footer runat="server" ID="footer" />
        <script type="text/javascript">
          
            $(document).ready(function () {
                startRequest();
                setInterval("startRequest()", 1000 * 60);
                //setInterval这个函数会根据后面定义的1000既每隔1秒执行一次前面那个函数
            });

            function startRequest() {
                $.ajax({
                    type: 'POST',
                    url: "/admin/controls/service.ashx/isNewOrder?" + Math.random(),
                    success: function (data) {
                        if (data != "no") {
                            $("#tip").html(data);
                        }
                    }
                });
            }
        </script>
    </form>
</body>
</html>


